package com.mrd.gtimp.business.repository;

import com.mrd.gtimp.business.entity.DeclarationFree;
import com.mrd.spring.repository.BaseRepository;

import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author xiewl
 */
public interface DeclarationFreeDao extends BaseRepository<DeclarationFree, String> {
    /**
     * 根据报关单id查找结算信息
     *
     * @param id id
     * @return 报关费用
     */
    DeclarationFree findByDeclarationId(String id);

    /**
     * 根据支付编号获取结算信息
     *
     * @param payId 支付编号
     */
    @Query("from com.mrd.gtimp.business.entity.DeclarationFree where pay_id = ?1")
    List<DeclarationFree> findByPay_id(String payId);
}
